/**                           _ooooo_
 *                           o8888888o
 *                           88" . "88
 *                           (| -_- |)
 *                            o\ = /o
 *                        ____/`---'\____
 *                      .   ' \\| |// `.
 *                       / \\||| : |||// \
 *                     / _||||| -:- |||||- \
 *                       | | \\\ - /// | |
 *                     | \_| ''\---/'' | |
 *                      \ .-\__ `-` ___/-. /
 *                   ___`. .' /--.--\ `. . __
 *                ."" '< `.___\_<|>_/___.' >'"".
 *               | | : `- \`.;`\ _ /`;.`/ - ` : | |
 *                \ \ `-. \_ __\ /__ _/ .-` / /
 *         ======`-.____`-.___\_____/___.-`____.-'======
 *                            `=---='
 *
 *         .............................................
 *                 佛祖保佑             永无bug
 *
 *       created by k on 2015/4/23. email:527565073@qq.com
 */
(function($){
    var pluginName = "fuck",
        _default = {
            name:"name",
            age:"age",
            sex:"sex",
            FuckYou:function(){
                alert("Fuck off");
            }
        }

    var fuck = function(elem,options){
        this.elem = elem; //Dom对象
        this.$elem = $(this.elem); //jquery对象
        this.options = $.extend({},_default,options || "");
        this.init();
        //this.fuck();
    }

    fuck.prototype={
        init:function(){
            var _this = this;
            this.$elem.bind('click',{myOptions:this.options},function(e){
                //alert("fuck you!");
                var $options = e.data.myOptions;
                //alert($options.name);
                _this.fuckOff();
            })
            //this.fuckOff();
        },
        fuckOff:function(){
            this.$elem.bind('click',{myOptions:this.options},function(e){
                var $options = e.data.myOptions;
                alert($options.sex);
            })
        }
    }

    $.fn[pluginName]=function(options){
        return this.each(function(){
           new fuck(this,options)
        })
    }

})(jQuery);